﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;

namespace Epitech.Krisk.Xna.UI.Game.Menu.Intro
{
    class Interactivite : ISequenceIntro
    {
        Vector2 interpos;
        Vector2 interpos2;
        Vector2 interpos3;
        Texture2D _hand;
        Texture2D _card;
        Texture2D _interText;

        public void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Begin();
            spriteBatch.Draw(_interText, interpos, Color.White);
            spriteBatch.Draw(_card, interpos2, Color.White);
            spriteBatch.Draw(_hand, interpos3, Color.White);
            spriteBatch.End();
        }

        public void LoadContent(ContentManager _content)
        {
            interpos = new Vector2(1000, 180);
            interpos2 = new Vector2(400, 250);
            interpos3 = new Vector2(0, 400);

            _card = _content.Load<Texture2D>("Intro/Interactivite/card");
            _hand = _content.Load<Texture2D>("Intro/Interactivite/hand");
            _interText = _content.Load<Texture2D>("Intro/Interactivite/Interactivite");
        }

        public void UnloadContent()
        {
        }

        public void Update(GameTime gameTime, TimeSpan _time)
        {
            interpos.X -= 0.1f * (float)gameTime.ElapsedGameTime.TotalMilliseconds;
            interpos2.X += 0.12f * (float)gameTime.ElapsedGameTime.TotalMilliseconds;
            interpos3.X += 0.38f * (float)gameTime.ElapsedGameTime.TotalMilliseconds;
            interpos3.Y -= 0.03f * (float)gameTime.ElapsedGameTime.TotalMilliseconds;
        }
    }
}
